package cn.oniokey.waterDetection.service.serviceImpl;

import cn.oniokey.waterDetection.domain.Water;
import cn.oniokey.waterDetection.mapper.WaterMapper;
import cn.oniokey.waterDetection.service.WaterService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WaterServiceImpl implements WaterService {

    final
    WaterMapper waterMapper;

    public WaterServiceImpl(WaterMapper waterMapper) {
        this.waterMapper = waterMapper;
    }

    @Override
    public void insert(Water water) {
        waterMapper.insert(water);
    }

    @Override
    public List<Water> getWaterById(String clientId) {
        return waterMapper.getWaterById(clientId);
    }

    @Override
    public Water getNewWaterById(String clientId) {
        return waterMapper.getNewWaterById(clientId);
    }
}
